package com.yy;

import java.util.Map;

/**
 * 描述
 * 作者 雷哥
 */
public class TestApp {
    public static void main(String[] args) {
     // testPay();
//        testQuery();
       testRefund();
    }

    /**
     * 退款
     */
    private static void testRefund() {
        String outTradeNo="TRADE-12312312312311123123111222";
        String refundAmount="100";
        String refundReason="垃圾产品，不想要了";
        Map<String, Object> map = PayService.refund(outTradeNo, refundAmount, refundReason, null);
        System.out.println("map = " + map);
    }

    /**
     * 支付状态查询
     */
    private static void testQuery() {
        String outTradeNo="TRADE-12312312312311123123111222";
        Map<String, Object> map = PayService.queryPay(outTradeNo);
        System.out.println("map = " + map);
    }

    /**
     * 测试支付
     */
    private static void testPay() {
        String outTradeNo="TRADE-12312312312311123123111222";
        String subject="测试支付";
        String totalAmount="100";
        String undiscountableAmount="0";
        String body="物业费";
        String notifyUrl="http://4mv9pm.natappfree.cc/callback";
        Map<String, Object> map = PayService.pay(outTradeNo, subject, totalAmount, undiscountableAmount, body,notifyUrl);
        System.out.println(map);
    }
}
